import { Component } from '@angular/core';
// import { CalculatorService } from '@app/serves/app.serve';
import { NzButtonModule } from 'ng-zorro-antd/button';

@Component({
  selector: 'app-welcome',
  standalone: true, //是否为独立组件
  imports: [NzButtonModule],
  templateUrl: './welcome.component.html',
  styleUrls: ['./welcome.component.less']
})
export class WelcomeComponent {
  //依赖注入公共逻辑
  // private calculatorService = inject(CalculatorService);
  //调用公共方法
  // totalCost = this.calculatorService.add(50, 25);
  announcement = 'hello world';
  ingredientList = [
    { name: 'noodles', quantity: 1 },
    { name: 'miso broth', quantity: 1 },
    { name: 'egg', quantity: 2 }
  ];
  changeStr() {
    this.announcement = this.announcement.toUpperCase();
  }
}
